package com.fwzhang.third.thread;

import java.util.concurrent.locks.LockSupport;

public class TestThread implements Runnable {

    /**
     * When an object implementing interface <code>Runnable</code> is used
     * to create a thread, starting the thread causes the object's
     * <code>run</code> method to be called in that separately executing
     * thread.
     * <p>
     * The general contract of the method <code>run</code> is that it may
     * take any action whatsoever.
     *
     * @see Thread#run()
     */
    @Override
    public void run() {
        System.out.println("线程开始");
        try {
            LockSupport.parkUntil(this, 1641897809000L);
            System.out.println("唤醒");
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("线程结束");
    }
}
